import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { AddComponent } from './add/add.component';
import { IndexComponent } from './index/index.component';
import { DetailComponent } from './detail/detail.component';
import { QuestionComponent } from './question.component';
@NgModule({
    imports: [
        RouterModule.forChild([
            {
                path: '', component: QuestionComponent,
                children: [
                    { path: 'detail', component: DetailComponent },
                    { path: 'index', component: IndexComponent },
                    { path: 'add', component: AddComponent },
                    {
                        path: '',
                        redirectTo: '/question/index',
                        pathMatch: 'full'
                    },
                ]
            }
        ])
    ],
    exports: [
        RouterModule
    ]
})
export class QuestionRoutingModule { }
